import 'package:flutter/material.dart';

class Sliver03 extends StatefulWidget {
  const Sliver03({Key key}) : super(key: key);

  @override
  _Sliver03State createState() => _Sliver03State();
}

class _Sliver03State extends State<Sliver03>
    with SingleTickerProviderStateMixin {
  AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(vsync: this);
  }

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: CustomScrollView(
        slivers: [
          SliverAppBar(
            title: Text('SliverAppBar'),
          ),
          SliverAnimatedOpacity(
            opacity: 0.9,
            duration: Duration(seconds: 2),
            sliver: SliverToBoxAdapter(
              child: FlutterLogo(
                size: 200,
              ),
            ),
          ),
          SliverIgnorePointer(
            ignoring: true,
            sliver: SliverToBoxAdapter(
              child: ElevatedButton(
                child: FlutterLogo(size: 100,),
                onPressed: () {
                  print('object');
                },
              ),
            ),
          ),
          SliverGrid(
              delegate: SliverChildListDelegate([
                Icon(Icons.ac_unit),
                Icon(Icons.access_alarm),
                Icon(Icons.offline_bolt),
                Icon(Icons.e_mobiledata),
                Icon(Icons.label),
                Icon(Icons.padding)
              ]),
              gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
                  maxCrossAxisExtent: 120)),
        ],
      ),
    );
  }
}
